package service.impl;

import java.util.List;

import dao.OyxCollectionMessageDao;
import dao.impl.OyxCollectionMessageDaoImpl;
import service.OyxCollectionMessageService;

public class OyxCollectionMessageServiceImpl implements OyxCollectionMessageService {

	OyxCollectionMessageDao cmd =new OyxCollectionMessageDaoImpl();
	
	//通过用户id获得个人的收藏商品信息并分页展示
	@Override
	public List getUserCollection(Integer userId, Integer collectionPageNo, Integer collectionPageSize) {
		List userCollection = cmd.getUserCollection(userId, collectionPageNo, collectionPageSize);
		return userCollection;
	}
	//通过用户id获取个人收藏商品总条数
	@Override
	public Integer getCollectionRows(Integer userId) {
		Integer collectionRows = cmd.getCollectionRows(userId);
		return collectionRows;
	}
	
	//通过用户id及收藏商品编号  删除登录用户对应的收藏商品
	@Override
	public Integer deleteCollection(Integer userId, Integer collection_id) {
		 Integer deleteCollection = cmd.deleteCollection(userId, collection_id);
	      
		return deleteCollection;
	}
	

}
